package io.gitee.zhangbinhub.admin.po

import io.swagger.v3.oas.annotations.media.Schema

import jakarta.validation.constraints.NotBlank

/**
 * @since JDK 11
 */
@Schema(description = "应用配置参数")
data class ApplicationPo(
    @field:Schema(description = "应用ID")
    var id: String? = null,

    @field:Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "应用名称不能为空")
    var appName: String? = null,

    @field:Schema(description = "权限范围，多个权限“,”分隔")
    var scope: String? = null,

    @field:Schema(description = "应用标识")
    var identify: String? = null,

    @field:Schema(description = "token 有效期，单位秒", requiredMode = Schema.RequiredMode.REQUIRED)
    var accessTokenValiditySeconds: Int = 86400,

    @field:Schema(description = "refresh token 有效期，单位秒", requiredMode = Schema.RequiredMode.REQUIRED)
    var refreshTokenValiditySeconds: Int = 2592000
)
